/*
 * MensajeServidor.cpp
 *
 *  Created on: 25/11/2013
 *      Author: fernando
 */

#include "MensajeServidor.h"
#include "logica/JsonLevel.h"
#include <string>
#include <vector>

using std::string;
using std::vector;

string MensajeServidor::setTableroInicial(vector<CeldaBase*>* vec,
		unsigned int filas, unsigned int columnas, Json::Value vecPuntajes){
	Json::Value book_json(Json::objectValue);
	Json::Value valor(Json::objectValue);
	Json::Value vec_json(Json::arrayValue);
	for (vector<CeldaBase*>::iterator it = vec->begin();
			it != vec->end(); ++it){
		vec_json.append((*it)->toJson());
	}
	book_json["filas"] = filas;
	book_json["columnas"] = columnas;
	book_json["vector"] = vec_json;
	book_json["puntajes"] = vecPuntajes;
	book_json["fondo"] = JsonLevel::getFondo();
	return book_json.toStyledString();
}
